import request from '@/utils/request'

// 新增
export function addOperator(data) {
  return request({
    url: '/operator/operator/add',
    method: 'post',
    data: data
  })
}

// 修改
export function editOperator(data) {
  return request({
    url: '/operator/operator/edit',
    method: 'PUT',
    data: data
  })
}

// 查询列表
export function getOperatorList(query) {
  return request({
    url: '/operator/operator/list',
    method: 'get',
    params: query
  })
}

// 删除
export function delOperator(id) {
  return request({
    url: '/operator/operator/remove/' + id,
    method: 'delete'
  })
}

// 查询详细
export function getDetailOperator(id) {
  return request({
    url: '/operator/operator/' + id,
    method: 'get'
  })
}

// 修改密码,只传id和password
export function updatePassword(data) {
  return request({
    url: '/operator/operator/updatePassword',
    method: 'PUT',
    data: data
  })
}


